home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Add-Ons / MicroPhone / Open Mike™ / Open Mike™ 003 / Mike's Folder / Question & Answer < prev    next >
Encoding:
Text File  |  1993-03-01  |  7.2 KB  |  130 lines  |  [TEXT/ttxt]

  1. Question & Answer
  2. =================
  3. Copyright © 1993 by Celestin Company
  4. All rights reserved.
  5.  
  6. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
  7.  
  8. Introduction
  9. ------------
  10. Sometimes the best ideas come to you in the middle of the night. In a dream, or perhaps in a restless fit of imagination, you discover the answer to the problem that has been perplexing you for days. Sometimes the ideas just don't come. If this happens to you, read on weary reader...
  11.  
  12. Dialback Security
  13. -----------------
  14. Q: I have a host that I dial into that asks for a security password, hangs up, and dials me back. Is there a good way of automating this procedure in MicroPhone?
  15.  
  16.  - J. Redmond
  17.    Spokane, WA
  18.  
  19. A: The best way to automate this procedure would be to write a modem driver designed for dialback security. However, there is a simpler alternative. The following script assumes that your host will answer the call by asking for a password and dialback phone number, hang up, and return your call.
  20.  
  21.   Dial Service "'Secure System'"
  22.   Wait for Text "'Password: '"
  23.   Send Text String "'apples@oranges^M'"
  24.   Wait for Text "'Dialback: '"
  25.   Send Text String "'555-1212^M'"
  26.   When Text Equals "'authorized'"
  27.     Remark "--- password and dialback were correct"
  28.     Remark "--- let's hang up and wait for host to return call"
  29.     Hang Up
  30.     Wait for Call
  31.   Or When Seconds Have Passed "30"
  32.     Remark "--- password and/or dialback were invalid"
  33.     Remark "--- host will not return call"
  34.     Hang Up
  35.     Alert OK "'Something went wrong. Verify password and dialback.'"
  36.   End When 
  37.  
  38. In the above script example, you dial the host and wait for it to respond with the password prompt. Upon receiving the prompt, you send out your password followed by a carriage return. The host then asks for your dialback number. You respond with your dialback number and wait for the host to authorize the dialback, which will happen within 30 seconds. If authorization occurs, you hang up and wait for the host to return your call. Otherwise, you simply hang up and post a message to yourself reminding you that something went wrong.
  39.  
  40. Sitting in the Background
  41. -------------------------
  42. Q: I want to keep MicroPhone running in the background, but I don't want it hogging the serial port since I might want to run another comm program such as America Online. How can I keep it from interfering with other software?
  43.  
  44.  - P. Simmons
  45.    Atlanta, GA
  46.  
  47. A: Under the Phone menu, there is a menu item called Close (Open) Connection. If the menu item says Close Connection, choose it. This will release the current port from use by MicroPhone. If you go back to the menu, you'll notice that it will say Open Connection. This allows you to reopen a connection. If you are not going to be using the port for a while, keep it closed and open it only when you need it opened.
  48.  
  49. Beeps and Failed Transfers
  50. --------------------------
  51. Q: Sometimes I need to cancel a ZMODEM receive while the transfer is in progress. This causes lots of garbage to appear on the screen. I have a pretty long beep sound, and it seems to get played an awful lot while the garbage flows onto the screen. Is there any way to prevent this from happening?
  52.  
  53.  - T. Mitchell
  54.    Hope, AR
  55.  
  56. A: Go to the Settings menu and choose Preferences. From this dialog, make sure that the option for "Turn off non-script sounds" is unchecked. Click the Save button to make this preference permanent. This will prevent the annoying beep sounds during cancelled ZMODEM receives.
  57.  
  58. Keeping Track
  59. -------------
  60. Q: I know that MicroPhone has a built-in timer. How can I take advantage of it from scripting in order for me to keep track of my online sessions?
  61.  
  62.  - J. Brahms
  63.    Chicago, IL
  64.  
  65. A: There are several script commands in MicroPhone that allow you to manipulate the built-in timer. For example, if you want to reset the timer to zero and begin ticking away after you've dialed a particular service, try this script:
  66.  
  67.   Dial Service "'Particular Service'"
  68.   Timer Set Value "0"
  69.   Timer Run 
  70.   Clock Set Mode to Timer
  71.  
  72. Modem Driver Beeps
  73. ------------------
  74. Q: When I use Dial Service, MicroPhone beeps three times after a successful connection. How can I make it not beep?
  75.  
  76.  - E. Ludlow
  77.    Sacramento, CA
  78.  
  79. A: The best way to do this is modify the modem driver. You can modify any of MicroPhone's modem drivers except Standard. If you are using Standard, Standard (autobaud) is a good alternative.
  80.  
  81. First, go to the Script menu and choose Edit Scripts. Then, choose Modem Driver from the Script Type popup menu. At this point, go to the File menu and choose Open Modem Driver. In this example, I'll modify Standard (autobaud). Choose the Dial Service script from the list of script, and then click the Modify button in the Script Manager. Near the end of the script, you'll notice the following commands:
  82.  
  83.   When Expression "Pos('CONNECT',TheLine(CursorRow - 1)) > 0"
  84.     Set Variable * b_rate from Expression "BaudRate"
  85.     If Line Contains "'38400'"
  86.       Set Comm Param Baud Rate 38,400
  87.     Else If Line Contains "'19200'"
  88.       Set Comm Param Baud Rate 19,200
  89.     Else If Line Contains "'9600'"
  90.       Set Comm Param Baud Rate 9600
  91.     Else If Line Contains "'2400'"
  92.       Set Comm Param Baud Rate 2400
  93.     Else If Line Contains "'1200'"
  94.       Set Comm Param Baud Rate 1200
  95.     Else If Line Contains "'CONNECT'"
  96.       Set Comm Param Baud Rate 300
  97.     End If
  98.     Beep
  99.     Beep
  100.     Beep
  101.     Set Variable * online from Expression "TRUE"
  102.     Dialog Discard 
  103.     Return Success
  104.     ...
  105.  
  106. Remove the three beep commands and click OK in the Script Editor. Then, go to the File menu and choose Save Modem Driver. That's it!
  107.  
  108. Leading Zeros
  109. -------------
  110. Q: When I name my files, I use the current day, month, and year. How can I put leading zeroes on these number? I want 04/07/93, not 4/7/93. Please help!
  111.  
  112.  - T.J. Kirkpatrick
  113.  
  114. A: What you want to do is add a zero to the beginning of the number, regardless of whether it needs it or not. Then, just take the last two digits in the number. If the zero is not needed, it gets stripped out. If it is needed, then you have your leading zero. I usually delete variables I no longer need, hence the delete variable commands. Take a look at the following script:
  115.  
  116.   Set Variable myDay from Expression "'0' & String(Day)"
  117.   Set Variable myDay from Expression "Mid(myDay,Length(myDay) - 1,2)"
  118.   Set Variable myMonth from Expression "'0' & String(Month)"
  119.   Set Variable myMonth from Expression "Mid(myMonth,Length(myMonth) - 1,2)"
  120.   Set Variable myYear from Expression "'0' & String(myYear)"
  121.   Set Variable myYear from Expression "Mid(myYear,Length(myYear) - 1,2)"
  122.   Set Variable myAll from Expression "myDay & '/' & myMonth & '/' & myYear"
  123.   Delete Variable myDay
  124.   Delete Variable myMonth
  125.   Delete Variable myYear
  126.  
  127. Final Thoughts
  128. --------------
  129. If you've got a specific question, or need to know how a certain aspect of MicroPhone works, send us some mail. We'll try to get as many of your questions answered in future editions of this column. And, who knows? Maybe your question will prompt an entire article to be written!
  130.